package org.lvhengchang.schoolmanager.service.impl;

import java.util.List;

import org.lvhengchang.schoolmanager.bean.Teacher;
import org.lvhengchang.schoolmanager.dao.TeacherDao;
import org.lvhengchang.schoolmanager.service.TeacherService;

public class TeacherServiceImpl implements TeacherService{
	private TeacherDao teacherDao = new TeacherDao();

	@Override
	public int deleteTeacher(String teacher_id) throws Exception {
		return teacherDao.deleteTeacher(teacher_id);
	}

	@Override
	public Teacher loginTeacher(String username, String password)
			throws Exception {
		return teacherDao.loginTeacher(username, password);
	}

	@Override
	public int saveTeacher(Teacher teacher) throws Exception {
		return teacherDao.insertTeacher(teacher);
	}

	@Override
	public List<Teacher> selectByAll() throws Exception {
		return teacherDao.selectAll();
	}

	@Override
	public Teacher selectById(String teacher_id) throws Exception {
		return teacherDao.selectById(teacher_id);
	}

	@Override
	public int updateTeacher(Teacher teacher) throws Exception {
		return teacherDao.updateTeacher(teacher);
	}

}
